<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>药典管理-疾病添加</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link type="text/css" rel="stylesheet"
			href="${pageContext.request.contextPath}/drugUI/css/style.css" />
<link type="text/css" rel="stylesheet"
			href="${pageContext.request.contextPath}/drugUI/css/main.css" />
<script type="text/javascript"
			src="${pageContext.request.contextPath}/drugUI/js/util.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath}/drugUI/js/jquery1.4.2.min.js"></script>
<style>
#Whatever{ background-image:url(${pageContext.request.contextPath}/drugUI/image/tabbar_level1_bk.gif);}
ul.TabBarLevel{
	list-style:none;
	margin:0;
	padding:0;
	height:29px;
}
ul.TabBarLevel li{
	float:left;
	padding:0;
	height:29px;
	margin-right:1px;
	background:url(${pageContext.request.contextPath}/drugUI/image/tabbar_level1_slice_left_bk.gif) left top no-repeat;
	font-size: 9pt;
}
ul.TabBarLevel li a{
	display:block;
	line-height:29px;
	padding:0 12px;
	color:#333;
	background:url(${pageContext.request.contextPath}/drugUI/image/tabbar_level1_slice_right_bk.gif) right top no-repeat;
	white-space: nowrap;
	font-size: 9pt;
	/*font-weight: bold;*/
}
ul.TabBarLevel li.Selected{
	background:url(${pageContext.request.contextPath}/drugUI/image/tabbar_level1_slice_selected_left_bk.gif) left top no-repeat;
	font-size: 9pt;
}
ul.TabBarLevel li.Selected a{
	background:url(${pageContext.request.contextPath}/drugUI/image/tabbar_level1_slice_selected_right_bk.gif) right top no-repeat;
}
ul.TabBarLevel li a:link,ul.TabBarLevel li a:visited{
	color:#000;
	text-decoration:none;
}
ul.TabBarLevel li a:hover,ul.TabBarLevel li a:active{
	color:#F30;
	text-decoration:none;
}
ul.TabBarLevel li.Selected a:link,ul.TabBarLevel li.Selected a:visited{
	color:#000;
	text-decoration:none;
	font-weight: bold;
	font-size: 9pt;
}
ul.TabBarLevel li.Selected a:hover,ul.TabBarLevel li.Selected a:active{
	color:#000;
	text-decoration:none;
	font-size: 9pt;
}
div.HackBox {
  padding : 0px 0px;
  border-left: 1px solid #b1b1b1;
  border-right: 1px solid #b1b1b1;
  border-bottom: 1px solid #b1b1b1;
  margin:0;
  width:100%;
  height:auto;
  font-size:12px;

}
</style>
</head>
<body style="overflow-x: hidden; overflow-y:auto;" scroll="no">
<div id="container">
		<div id="Whatever" style="padding:0px; float:none; width:100%;">
			<ul class="TabBarLevel" id="TabPage">
			<li class="Selected"><a href="javascript:void(0)" onFocus="this.blur();" onClick="go('0');">疾病详细信息</a></li>
			<li><a href="javascript:void(0)" class="STYLE1" onFocus="this.blur();" onClick="go('1');" >疾病处方列表</a></li>
            </ul>
        </div>
		<div id="tabContent0" style="float:none;">
			<iframe id="contentFrame0" marginheight="0" marginwidth="0" 
				frameborder="0"   scrolling="no" style="width:100%; height:100%;">
			</iframe>
		</div>
		<div id="tabContent1" style="float:none;display:none;">
			<iframe id="contentFrame1" marginheight="0" marginwidth="0" 
				frameborder="0"   scrolling="no"  style="width:100%; height:100%;">
			</iframe>
		</div>
</div>
<script language="javascript">
var diseaseid = "${diseaseid}";
var frame0Load = false;
var frame1Load = false;
var type='<%=request.getParameter("type")%>';
function getTab(flag) {  
	  var elList, i;
	  elList = document.getElementById("TabPage").getElementsByTagName("li");
	  for (i = 0; i < elList.length; i++){
		 elList[i].className ="";
	  }
	  elList[flag].className ="Selected";
	  elList[flag].blur();
	}
	//通过改变iframe的src来实现变换不同的页
	function go(flag){
		if(flag==""){
			flag="0";
		}
		if("0"==flag){
			if(!frame0Load){
			    if(type=='add')
			    {
			    document.all("contentFrame0").src="${pageContext.request.contextPath}/drugUI/disease/disease.edit.action?type=add";
			    }
			    else
			    {
			    document.all("contentFrame0").src="${pageContext.request.contextPath}/drugUI/disease/disease.edit.action?type=edit&diseaseid="+diseaseid;
			    }
		 		frame0Load=true;
			}
		 	document.getElementById("tabContent0").style.display="block";
		 	document.getElementById("tabContent1").style.display="none";
		}
		else if("1"==flag){
			if(!frame1Load){
				document.all("contentFrame1").src="${pageContext.request.contextPath}/drugUI/recipe/recipe.list.action?diseaseid="+diseaseid;
				frame1Load=true;
			}
			document.getElementById("tabContent1").style.display="block";
			document.getElementById("tabContent0").style.display="none";
		}
		getTab(parseInt(flag));
	}
		/**
		 * 自动调整对话框高度
		 */
		 function resize()
		 {
			var height = document.getElementById("container").offsetHeight;
			dialogResize( 455 );
		 }
		
		
		window.onload = function() {
			resize();
			go("");
		};
	</script>
<body>
</html>
<%@ include file="/drugUI/common/footer.jsp"%>
